package com.luban.concurrency;

public class ThreadExample3 {
    static Thread thread = null;
    public static boolean runing = true;

    public static void main(String[] args) throws InterruptedException {
        traditional();
        Thread.sleep(100);
        runing = false;
    }


    public static void traditional() {
        thread = new Thread() {
            @Override
            public void run() {
                while (runing) {
                    testMethodCall();
                }
            }
        };
        thread.start();
    }

    public static void testMethodCall() {
        Integer i = 1;
        i.toString();

    }
}
